package com.eusoft.book_manage.util;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.List;

/**
 * 树形数据结点
 * @author eusoft
 * @date 2021/10/19 9:25
 */
@Data
public class TreeNode {

    @TableField(exist = false)
    private Integer aid;

    @TableField(exist = false)
    private String name;

    @TableField(exist = false)
    private Boolean isDelete;

    @TableField(exist = false)
    private Integer fatherAid;

    @TableField(exist = false)
    private List<TreeNode> children;

    public TreeNode(Integer aid, String name, Integer fatherAid, Boolean isDelete) {
        this.aid = aid;
        this.name = name;
        this.isDelete = isDelete;
        this.fatherAid = fatherAid;
    }

    public TreeNode(Integer aid, String name, Integer fatherAid) {
        this.aid = aid;
        this.name = name;
        this.fatherAid = fatherAid;
    }
}
